-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Setup DVC Section #3655
Add Setup DVC Section #3655
Conversation
type: MessageFromWebviewType.INITIALIZED | ||
}) | ||
expect(mockPostMessage).toHaveBeenCalledTimes(1) | ||
it('should send the initialized message on first render', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming this test was supposed to be in App
instead of Experiments
.
<p>DVC needs to be setup before you can access experiments.</p> | ||
<Button | ||
onClick={() => | ||
setSectionCollapsed({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other options could be:
- only opening up the new section and not collapsing the current one
- Take off buttons entirely and just reference going to other section.
Current choice is opening the section we want the user to go to and collapsing all other sections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could hide or "grey out" the sections that are currently unavailable.
webview/src/setup/components/App.tsx
Outdated
> | ||
<Experiments | ||
isDvcSetup={ | ||
projectInitialized && Boolean(cliCompatible) && !needsGitCommit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better way to check for if DVC is setup properly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we discussed passing a "step" variable from the extension to let the webview know which screen to show. This would mean that the user could navigate between screens. Not sure how much sense that makes for the setup process.
Also, I don't think we use Boolean(variable)
anywhere as opposed to !!variable
. Although maybe we should turn on https://eslint.org/docs/latest/rules/no-implicit-coercion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to fix the redirects before merging.
The separation between the sections needs to be well-defined. After setup is complete I think we want to show the details of where the CLI has been located much like the tooltip that we show for the status bar item:
vscode-dvc/extension/src/status.ts
Line 107 in 21ef1dd
private getEnvDetails() { |
Seeing as we have a lot more room than a tooltip and we can make things far more obvious we want to show the version of the CLI/Min required version etc as this is very useful information that we can use to get people "unstuck". We can also go in the direction of removing the toast messages and moving them into the setup screen. Toast messages are here:
import { |
webview/src/setup/components/App.tsx
Outdated
> | ||
<Experiments | ||
isDvcSetup={ | ||
projectInitialized && Boolean(cliCompatible) && !needsGitCommit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we discussed passing a "step" variable from the extension to let the webview know which screen to show. This would mean that the user could navigate between screens. Not sure how much sense that makes for the setup process.
Also, I don't think we use Boolean(variable)
anywhere as opposed to !!variable
. Although maybe we should turn on https://eslint.org/docs/latest/rules/no-implicit-coercion
webview/src/setup/components/App.tsx
Outdated
isPythonExtensionInstalled={isPythonExtensionInstalled} | ||
needsGitInitialized={needsGitInitialized} | ||
needsGitCommit={needsGitCommit} | ||
projectInitialized={projectInitialized} | ||
pythonBinPath={pythonBinPath} | ||
hasData={hasData} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Q] What does hasData
have to do with setting up the CLI? Isn't this for experiments only? Same question for needsGitCommit
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do data status
and plots diff
work or throw an error when there are no commits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Q] What does hasData have to do with setting up the CLI? Isn't this for experiments only?
hasData
is used for when the DVC
section knows what to do with the Show Experiments
button that appears when Setup is complete. Though we could rename the prop to make things more clear!
Same question for needsGitCommit?
Makes sense! Will move the needsGitCommit
logic to Experiments
.
studio: true | ||
}) | ||
} | ||
text="Show Experiments" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[C] As well as having the button I think we would want to close the section and open the other ones when "setup completes".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! Though not sure how to implement it. I thought I could do this with an effect hook, but that breaks SETUP_SHOW_STUDIO
and SETUP_SHOW_EXPERIMENTS
. Will put some more thought into this one and do it in a followup!
<p>DVC needs to be setup before you can access experiments.</p> | ||
<Button | ||
onClick={() => | ||
setSectionCollapsed({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could hide or "grey out" the sections that are currently unavailable.
Thanks for the reviews, everyone! What's Left To Do:
All of these items are going to be in separate prs since they are going to require extra reviews. I'm currently working on the first one, but I think we're good to merge! Will wait a bit to make sure there are no objections :) |
Code Climate has analyzed commit 3eaf979 and detected 1 issue on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 94.9% (0.0% change). View more on Code Climate. |
Demo
Screen.Recording.2023-04-10.at.4.29.04.PM.mov
Part of #3434